﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Biz_Dal.Biz;
using System.IO;
using System.Drawing;


namespace Biz_Dal.Dal
{
    public class Image
    {
        BookIdeas_ShopDataContext ht = new BookIdeas_ShopDataContext();
        public static void UpdateImage(byte[] image, int id)
        { 

        }

        /// <summary>
        /// Chuyen  doi gia tri byteArray thanh Image
        /// </summary>
        /// <param name="byteArray">Gia tri dau vao dang byteArray</param>
        /// <returns>Ham tra ve mot bien kieu Image</returns>
        public static Image ConvertImage(byte[] byteArray)
        {
            ImageConverter imageConverter = new System.Drawing.ImageConverter();
            Image image = imageConverter.ConvertFrom(byteArray) as Image;
            return image;
        }
    }
}
